-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add transaction items to log and trace requests #224
Conversation
@@ -140,6 +145,16 @@ export function filterBlock(block: Block, dataRequest: DataRequest): void { | |||
if (rel.transaction) { | |||
include.addTransaction(log.transaction) | |||
} | |||
if (rel.transactionLogs && log.transaction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
archive response also doesn't include transaction if it is not explicitly requested with log.transaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.transactionLogs
and .transactionTraces
don't imply transaction presence. Hence, log inclusion should not rely on .transaction
property.
groupBy(logs, log => log.transactionIndex)
should be used instead.
@@ -140,6 +145,16 @@ export function filterBlock(block: Block, dataRequest: DataRequest): void { | |||
if (rel.transaction) { | |||
include.addTransaction(log.transaction) | |||
} | |||
if (rel.transactionLogs && log.transaction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.transactionLogs
and .transactionTraces
don't imply transaction presence. Hence, log inclusion should not rely on .transaction
property.
groupBy(logs, log => log.transactionIndex)
should be used instead.
} | ||
} | ||
if (rel.transactionTraces && log.transaction) { | ||
for (let trace of log.transaction.traces) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before, except this time presence of logs should be enforced here as well.
@@ -182,6 +197,11 @@ export function filterBlock(block: Block, dataRequest: DataRequest): void { | |||
if (rel.transaction) { | |||
include.addTransaction(trace.transaction) | |||
} | |||
if (rel.transactionLogs && trace.transaction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
4499d92
to
3719dd3
Compare
No description provided.